<template>
  <div id="app">
    <div id="nav">
      <router-link to="/">双日历切换插件</router-link>/
      <router-link :to="'/home/mobilecalendar?takeoffDate='+dateCache.takeoffDate">双日历切换插件
        （<span class="date"
              v-if="dateCache.takeoffDate">
          {{`${dateCache.takeoffDate.slice(5,7)}月${dateCache.takeoffDate.slice(8)}日`}}
        </span>
        <span class="week">{{dateCache.week}}</span>）
      </router-link>
    </div>

    <router-view/>
  </div>
</template>

<style lang="less">
@import 'style/reset.less';
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
#nav {
  padding: 30px;
  a {
    font-weight: bold;
    color: #2c3e50;
    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>

<script>
import { mapState } from 'vuex';

export default {
  computed: {
    ...mapState(['dateCache']),
  },
  data() {
    return {
    };
  },
  created() {
  },
};
</script>
